<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
    <title>用户管理-修改用户管理</title>
    <link rel="icon" href="favicon.ico" type="image/ico">
    <meta name="keywords" content="修改">
    <meta name="author" content="yinqi">
    <link href="/css/bootstrap.min.css" rel="stylesheet">
    <link href="/css/materialdesignicons.min.css" rel="stylesheet">
    <link href="/css/style.min.css" rel="stylesheet">

</head>
<body>
<div class="row">
    <div class="col-lg-12">
        <div class="card">
            <div class="card-header"><h4>用户管理-修改用户活动-修改用户活动</h4></div>
            <div class="card-body">

                <form action="/act/updateActs" method="post" class="row" enctype="multipart/form-data">
                    <input type="hidden" name="acId" th:value="${act.acId}" id="acId">
                    <div class="form-group col-md-4"></div>
                    <div class="form-group col-md-4">
                        <label for="acTitle">活动名称</label>
                        <input type="text" class="form-control" id="acTitle" name="acTitle" th:value="${act.acTitle}" />
                    </div>
                    <div class="form-group col-md-4"></div>
                    <div class="form-group col-md-12"></div>

                    <div class="form-group col-md-4"></div>
                    <div class="form-group col-md-4">
                        <label for="acDesc">具体描述</label>
                        <textarea type="text" class="form-control" id="acDesc" name="acDesc" th:text="${act.acDesc}" ></textarea>
                    </div>
                    <div class="form-group col-md-4"></div>
                    <div class="form-group col-md-12"></div>

                    <div class="form-group col-md-4"></div>
                    <div class="form-group col-md-4">
                        <input type="hidden" name="acPer" id="acPer" th:value="${act.acPer}">
                        <label for="PerName">活动发起人</label>
                        <input type="text" class="form-control" id="PerName" name="" th:value="${act.tbTou.name}" />
                    </div>
                    <div class="form-group col-md-4"></div>
                    <div class="form-group col-md-12"></div>

                    <div class="form-group col-md-4"></div>
                    <div class="form-group col-md-4">
                        <label for="acCount">报名人数</label>
                        <input type="text" class="form-control" id="acCount" name="acCount" th:value="${act.acCount}" />
                    </div>
                    <div class="form-group col-md-4"></div>
                    <div class="form-group col-md-12"></div>

                    <div class="form-group col-md-4"></div>
                    <div class="form-group col-md-4">
                        <label for="acCreateTime">创建时间</label>
                        <input type="text" class="form-control" id="acCreateTime" name="acCreateTime" th:value="${#temporals.format(act.acCreateTime,'yyyy-MM-dd HH:mm:ss')}" />
                    </div>
                    <div class="form-group col-md-4"></div>
                    <div class="form-group col-md-12"></div>

                    <div class="form-group col-md-4"></div>
                    <div class="form-group col-md-4">
                        <label for="acStartTime">开始时间</label>
                        <input type="text" class="form-control" id="acStartTime" name="acStartTime" th:value="${#temporals.format(act.acStartTime,'yyyy-MM-dd HH:mm')}" />
                    </div>
                    <div class="form-group col-md-4"></div>
                    <div class="form-group col-md-12"></div>

                    <div class="form-group col-md-4"></div>
                    <div class="form-group col-md-4">
                        <label for="acEndTime">结束时间</label>
                        <input type="text" class="form-control" id="acEndTime" name="acEndTime" th:value="${#temporals.format(act.acEndTime,'yyyy-MM-dd HH:mm')}" />
                    </div>
                    <div class="form-group col-md-4"></div>
                    <div class="form-group col-md-12"></div>

                    <div class="form-group col-md-4"></div>
                    <div class="form-group col-md-4">
                        <div class="form-group">
                            <label class="col-xs-12" for="acBarimg">上传二维码</label>
                            <img class="img-avatar img-avatar-48 m-r-10" th:src="${act.acBarimg}" th:alt="活动二维码" />
                            <div class="col-xs-12">
                                <input type="file" accept="image/jpg,image/png,image/gif" id="acBarimg" name="file" onchange="fileChange(this)">
                            </div>
                        </div>
                    </div>
                    <div class="form-group col-md-12"></div>


                    <div class="form-group col-md-4"></div>

                    <div class="form-group col-md-4"></div>
                    <div class="form-group col-md-12"></div>

                    <div class="form-group col-md-4"></div>
                    <div class="form-group col-md-4">
                        <button type="submit" class="btn btn-primary ajax-post" target-form="add-form">确 定</button>
                        <button type="button" class="btn btn-default" onclick="javascript:history.back(-1);return false;">返 回</button>
                      </div>
                </form>

            </div>
        </div>
    </div>

</div>
<script type="text/javascript" src="/js/jquery.min.js"></script>
<script type="text/javascript" src="/js/bootstrap.min.js"></script>
<script type="text/javascript" src="/js/perfect-scrollbar.min.js"></script>
<script type="text/javascript" src="/js/main.min.js"></script>
<script type="text/javascript" src="/js/axios.min.js"></script>
<script type="text/javascript" src="/js/wangEditor.min.js"></script>
<script type="text/javascript">
    var E = window.wangEditor;
    var editor = new E('#div1');
    var $text1 = $('#newsContent');
    editor.customConfig.onchange = function (html) {
        // 监控变化，同步更新到 textarea
        $text1.val(html)
    };
    editor.create();
    // 初始化 textarea 的值
    $text1.val(editor.txt.html())

    function fileChange(target) {
        var fileSize = 0;
        fileSize = target.files[0].size;
        var size = fileSize / 1024;
        if (size > 10000) {
            alert("附件不能大于10M");
            target.value = "";
            return false;   //阻止submit提交
        }
        var name = target.value;
        var fileName = name.substring(name.lastIndexOf(".") + 1).toLowerCase();
        if (fileName != "jpg" && fileName != "png"&&fileName!="gif"&&fileName!="jpeg") {
            alert("请选择图片格式文件上传(jpg、png、gif)！");
            target.value = "";
            return false;   //阻止submit提交
        }
    }
</script>
</body>
</html>
